package com.ldzy.pojo;

public enum ResultCode {
    //上面就是存放很多常量值，这个类的属性只能从这些常量值中取
    SUCCESS(2000,"操作成功！"),
    SUCCESS_LOGIN(2001,"登录成功！！"),
    SUCCESS_TRANSFER(2002,"转账成功！！"),

    ERROR(9000,"操作失败！！"),
    ERROR_LOGIN(9001,"登录失败！！"),
    ERROR_PARAM(9002,"请求参数没有/格式不对！！"),
    ERROR_TRANSFER(9003,"转账失败！！"),
    ;
    private Integer code;
    private String message;

    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
